﻿@model IEnumerable<DLM.Domain.DTO.PartyDTO>
@using Webdiyer.WebControls.Mvc;
<ul class="clearfix">
    @if (Model != null)
    {
        foreach (var item in Model)
        {
                                        
                                        
        <li class="clearfix">
            <div class="pic">
                <a href="@Url.Action("View", "Party", new { id = item.PartyID })">
                    @if (string.IsNullOrEmpty(item.PhotoUrl) && item.PublisherPhoto != "none_75_75.png")
                    {
                        <img width="70px" height="90px" src="@Url.Content("~/Files/Photos/" + item.UserID + "/" + item.PublisherPhoto)" alt="user pic" />
                    }
                    else
                    {
                        <img src="@Url.Content("~/Content/ad/none_75_75.png")" alt="头像" width="77px" height="90px" />
                    }
                </a>
            </div>
            <div class="info">
                <h5>
                    <a href="@Url.Action("View", "Party", new { id = item.PartyID })">主题：@item.Subject</a></h5>
                <p>
                    <a href="@Url.Action("View", "Party", new { id = item.PartyID })">活动时间： @item.PartyDate.Value.ToShortDateString()<br>
                        地点：@item.Location</a></p>
            </div>
        </li>
        }
    }
</ul>
<div class="paging">
@Ajax.Pager(Model as PagedList<DLM.Domain.DTO.PartyDTO>, new PagerOptions
{
    PageIndexParameterName = "friendid",
    CurrentPagerItemWrapperFormatString = "<span class=\"current\">{0}</span>",
    //NumericPagerItemWrapperFormatString = "{0}",
    PrevPageText = "<",
    NextPageText = ">",
    ShowNumericPagerItems = true,
    ShowFirstLast = false,
    ShowPrevNext = true,
    CssClass = "scott",
    MorePageText = "...",
    SeparatorHtml = ""
},
            new AjaxOptions { UpdateTargetId = "divFriend" }
    )
    </div>
